package com.ruoyi.common.enums.erp;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author YanWenliang
 * @date 2024/11/9 17:44
 * @desciption: 商机进度
 */
@Getter
@AllArgsConstructor
public enum CrmOrderProgessEnum {

    DISCOVER_DEMAND("0", "发现需求 (1%)"),
    CONFIRM_DEMAND("1", "确认需求 (10%)"),
    SOLUTION_PROVIDED("2", "解决方案 (30%)"),
    BUSINESS_NEGOTIATION("3", "商务谈判 (60%)"),
    BIDDING("4", "招投标 (90%)"),
    DEAL_CLOSED("5", "成交 (100%)"),
    INSPECTION_COMPLETED("6", "已验收"),
    SETTLEMENT_COMPLETED("7", "已结算"),
    LOST("8", "流失 (0)");

    private final String code;
    private final String info;

    public static String getInfo(String code){
        for (CrmOrderProgessEnum progessEnum : CrmOrderProgessEnum.values()) {
            if (progessEnum.code.equals(code)) {
                return progessEnum.info;
            }
        }
        return "无";
    }
}
